//package com.msz.controller;
//
//import javax.servlet.http.HttpSession;
//
//import com.msz.util.JwtUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.ResponseBody;
//import org.springframework.web.bind.annotation.RestController;
//
//import com.msz.domain.User;
//import com.msz.service.UserService;
//import com.msz.util.R;
//
//@Controller
//public class UserController {
//  @Autowired
//  private  UserService userService;
//  @RequestMapping("login")
//  public  String login(User user,HttpSession session) {
//	  User checkUser= userService.checkUser(user);
//	  if(checkUser!=null) {
//          session.setAttribute("username", checkUser.getUsername());
//		  return "redirect:/productList";
//	  }else {
//		  return "redirect:/toLogin";
//	  }
//
//  }
//
//  @RequestMapping("toLogin")
//  public String  toLogin() {
//	  return "login";
//  }
//
//
//  /*����RESTFul�������󣬽��շ�ʽΪGET
//   * */
//
////  @RequestMapping(value="/{uid}",method = RequestMethod.GET)
////  public @ResponseBody R queryUserById2(@PathVariable("uid") Integer id) {
////	  User user=  userService.queryUserById(id);
////	  return R.result(200, "��ѯ�ɹ�",user);
////
////  }
//
//  @RequestMapping(value="delete/{uid}",method = RequestMethod.GET)
//  public @ResponseBody R queryUserById3(@PathVariable("uid") Integer id) {
//	  User user=  userService.queryUserById(id);
//	  return R.result(200, "删除成功",user);
//
//  }
//}
